package lib

func init() {
	Probs = append(Probs, Problem{
		Num:         26,
		Discription: "原地删除非递减数组的重复项",
		Level:       1,
		Labels: map[string]int{
			"快慢指针": 1,
			"双指针滑动": 1,
		},
	})
}

func RemoveDuplicates(nums []int) int {
    slow:=0
    fast:=1
    for fast<len(nums){
        if nums[slow]!=nums[fast]{
            slow++
            nums[slow]=nums[fast]
        }

        fast++
    }

    return slow+1
}